﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Report_KSXS" Codebehind="KSXS.aspx.cs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <script type="text/javascript" src="../Include/JS/Lib/jquery-1.1.4.js"></script>
    <script type="text/javascript" src="../Include/JS/PopupCalendar.js"></script>
    <script type="text/javascript" src="../Include/Js/OpenWindow.js"></script>
    <script language="javascript" type="text/javascript">
    var  $j = jQuery.noConflict();
    function setValue(sp)
    {
        var txtSP=document.getElementById("<%=txtSP.ClientID %>");
        txtSP.value=sp;
    }
    </script>
<style type="text/css">
body {font-size:12px;margin:0;padding:0;}
a:visited{text-decoration:none;color:slategray;}
a:hover{text-decoration:underline;color:slategray;}
a:link{text-decoration:none;color:slategray;}
.juli {margin-top:10px;padding-left:20px;}
.z1{background-color:#e7e7e7; text-align:left; line-height:20px;}
.z2{background-color:#FFFFFF; text-align:left; line-height:20px;}
.zt3 {text-align:center; font-weight:600; color:#000000;}
.zt4 {text-align:center; color:#000000;}
.zt5 {text-align:right; font-weight:bold; font-family:Arial, Helvetica, sans-serif; color:#0000ff;}
.zt7 {text-align:right; color:#000000;}
.tb {width: 90%; background-color:#999999;}
a.lj {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:link {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:visited {font-size:12px; color:#ff9900; text-decoration:underline;}
a.lj:hover {color:#ff3300;}
a.lj:active {color:#ff3300;}
.menu_bg { background-color:#fef3bb; padding-left:20px;padding-top:6px; padding-bottom:6px;border-bottom:#cf994b 1px solid;}
.menu_bg3 { background-color:#f5f5f5; font-weight:bold; padding-left:20px;padding-top:6px; padding-bottom:6px;border-bottom:#cccccc 1px solid;border-top:#cccccc 1px solid;clear:left;}
.input_button {width:52px;height:23px;border:none;cursor:pointer; background:#ffffff url(../Include/Images/bt.gif) no-repeat;}
.input_button1 {width:74px;height:23px;border:none;cursor:pointer; background:#ffffff url(../Include/Images/bt1.gif) no-repeat;}
.input_button4 {width:52px;height:23px;border:none;cursor:pointer; background:#ffffff url(../Include/Images/bt.gif) no-repeat;font-weight:bold;}
h2 {padding-left:20px;padding-top:10px;margin:0; background: url(../Include/Images/menu_title.gif) repeat-x;height:21px;font-size:14px; font-weight:600;}
</style>    
</head>
<body>
    <form id="form1" runat="server">
    <h2>款式销售排行榜</h2>
    <div class="menu_bg">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
        </asp:ScriptManager>
        制单日期：<asp:TextBox ID="txtStart" runat="server" onclick="getDateString(this,oCalendarChs)"
            Width="100px"></asp:TextBox>至<asp:TextBox ID="txtEnd" runat="server" onclick="getDateString(this,oCalendarChs)"
                Width="100px"></asp:TextBox>&nbsp; 财务审核日期：<asp:TextBox ID="txtDate1" runat="server"
                    onclick="getDateString(this,oCalendarChs)" Width="100px"></asp:TextBox>至<asp:TextBox
                        ID="txtDate2" runat="server" onclick="getDateString(this,oCalendarChs)" Width="100px"></asp:TextBox>&nbsp;
        发货日期：<asp:TextBox ID="txtDate3" runat="server" onclick="getDateString(this,oCalendarChs)"
            Width="100px"></asp:TextBox>至<asp:TextBox ID="txtDate4" runat="server" onclick="getDateString(this,oCalendarChs)"
                Width="100px"></asp:TextBox>
        <br />
    平台：<asp:DropDownList ID="drpOrderFrom" runat="server"></asp:DropDownList>
    仓库：<asp:DropDownList ID="drpKW" runat="server"></asp:DropDownList>
    商品：<asp:TextBox ID="txtSP" runat="server"></asp:TextBox>&nbsp;<input type="button" id="selSP" class="input_button1"  value="清空商品" onclick="setValue('')" />
        <asp:Button ID="btnSearch" runat="server" class="input_button" Text="查询" OnClick="btnSearch_Click"/>
        &nbsp; <asp:Button ID="Button1" runat="server" class="input_button" Text="导出" OnClick="btnExport_Click"/>
    
    </div>
    <div class="menu_bg3">款式销售排行榜</div>
    <div class="juli">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
                <asp:GridView ID="grdKSXS" runat="server" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" Height="1px" Width="100%" AutoGenerateColumns="False" ShowFooter="True">
                    <Columns>
                        <asp:TemplateField HeaderText="序号" InsertVisible="False">
                            <ItemTemplate>
                              <asp:Label ID="Label2" runat="server" Text='<%# this.grdKSXS.PageIndex * this.grdKSXS.PageSize + this.grdKSXS.Rows.Count + 1%>'/>                   
                            </ItemTemplate>
                            <FooterStyle BorderStyle="Solid" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="款号" DataField="SPDM" >
                            <FooterStyle BorderStyle="Solid" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="商品名称" DataField="SPMC" >
                            <FooterStyle BorderStyle="Solid" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="销售数量" DataField="QTY" DataFormatString="{0:N0}" HtmlEncode="False" >
                            <FooterStyle BorderStyle="Solid" CssClass="zt5" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="占比（数量）" DataField="QTY_RATE" DataFormatString="{0:N2}%" HtmlEncode="False" >
                            <FooterStyle BorderStyle="Solid" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="销售金额" ConvertEmptyStringToNull="False" DataField="AMT" DataFormatString="{0:N2}" >
                            <FooterStyle BorderStyle="Solid" CssClass="zt5" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="占比（金额）" DataField="AMT_RATE" DataFormatString="{0:N2}%" HtmlEncode="False" >
                            <FooterStyle BorderStyle="Solid" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="平均单价" DataField="AVGPRICE" DataFormatString="{0:N2}" HtmlEncode="False" >
                            <FooterStyle BorderStyle="Solid" CssClass="zt5" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="仓库" DataField="KW" >
                            <FooterStyle BorderStyle="Solid" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="库存量" DataField="SL" DataFormatString="{0:N0}" HtmlEncode="False" >
                            <FooterStyle BorderStyle="Solid" CssClass="zt5" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="可用量" DataField="SL3" DataFormatString="{0:N0}" HtmlEncode="False" >
                            <FooterStyle BorderStyle="Solid" CssClass="zt5" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="周转期" DataField="PERIOD" DataFormatString="{0:N1}" >
                            <FooterStyle BorderStyle="Solid" CssClass="zt5" />
                            <HeaderStyle BackColor="#E7E7E7" BorderStyle="Solid" ForeColor="Black" HorizontalAlign="Center" />
                            <ItemStyle BorderStyle="Solid" HorizontalAlign="Right" />
                        </asp:BoundField>
                    </Columns>
                </asp:GridView>
       </ContentTemplate>
       <Triggers>
       <asp:AsyncPostBackTrigger ControlID="btnSearch"  EventName="Click"/>
       </Triggers>
        </asp:UpdatePanel>
        <asp:HiddenField ID="hdSPDM" runat="server" />
    </div>
    </form>
</body>
</html>
